package no.sachmuld.methodcombination.examples.reflection.roles.employee.lib;

import no.sachmuld.methodcombination.api.MethodInvocation;
import no.sachmuld.methodcombination.examples.reflection.roles.employee.api.Employee;
import no.sachmuld.methodcombination.examples.reflection.roles.employee.api.Manager;

import java.util.ArrayList;
import java.util.List;

/**
 *
 */
public class ManagerImpl extends EmployeeBehaviour implements Manager {

    private List<Employee> employees = new ArrayList<>();

    @Override
    public void addEmployee(Employee employee) {
        employees.add(employee);
    }

    @Override
    public int salary(MethodInvocation<Integer> methodInvocation) {
        return methodInvocation.proceed() + employees.size() * 10000;
    }
}
